package cn.edu.ecnu.gis.client.gadgets;

import cn.edu.ecnu.gis.client.model.Gadget;
import cn.edu.ecnu.gis.client.model.GadgetClass;
import cn.edu.ecnu.gis.client.view.FlashPanel;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
import com.google.gwt.user.client.ui.ImageBundle;

public class DiceWarsGadget extends Gadget{
	
	public static class Class extends GadgetClass{
		public Class(){
			super("DiceWars",true);
		}
		public Gadget newGadget(){
			return new DiceWarsGadget(this);
		}
	}
	
	private FlashPanel flash = new FlashPanel();  
	
    protected DiceWarsGadget(Class c){
    	super(c);
    	initWidget( flash );
    	setStyleName("DiceWars");
    	refresh();
    }
    
    public void refresh() {
    	flash.setURL("http://www.gamedesign.jp/flash/dice/dice.swf");
    }
    public interface BoundImage extends ImageBundle {

        AbstractImagePrototype inbox();
    }

   
    public AbstractImagePrototype getBoundImage() {
        BoundImage images = (BoundImage) GWT.create(BoundImage.class);
        return images.inbox();
    }
}
